import React from "react";
import StyledComponentsRegistry from "./GlobalStyleRegistry";
import "../styles/app.css";
import type { Metadata } from "next";

export const metadata: Metadata = {
	title: "Craft.js",
	description: "A React framework for building drag-n-drop page editors.",
	alternates: {
		canonical: "https://craft.js.org/",
	},
	twitter: {
		site: "craft.js.org",
		card: "summary_large_image",
	},
};
function RootLayout({ children }: { children: React.ReactNode }) {
	return (
		<html>
			<body>
				<StyledComponentsRegistry>{children}</StyledComponentsRegistry>
			</body>
		</html>
	);
}

// Only uncomment this method if you have blocking data requirements for
// every single page in your application. This disables the ability to
// perform automatic static optimization, causing every page in your app to
// be server-side rendered.
//
// MyApp.getInitialProps = async (appContext) => {
//   // calls page's `getInitialProps` and fills `appProps.pageProps`
//   const appProps = await App.getInitialProps(appContext);
//
//   return { ...appProps }
// }

export default RootLayout;
